#ifndef SIMULATOR_H
#define SIMULATOR_H


template<int m> class Simulator;

#include "Systems/oneservo.h"
#include "Systems/onewheel.h"
#include "Systems/twoservos.h"
#include "Systems/twowheels.h"
#include "Data/learningdata.h"
#include <QString>
#include <QFile>
#include <QTextStream>
#include <QList>
#include <QLabel>
#include <QPainter>
#include <QPaintEvent>
#include <QTimer>
#include <iostream>


template<int m>
class Simulator : public QLabel, public QThread
{
   // Q_OBJECT

public:
    Simulator(QString filename);
    void mousePressEvent( QMouseEvent* ev );
    void reinitialize();
    void run();
    QList<double> getState(QList<double> objective);
    ~Simulator();

private:
    QString dataFile;
    bool ran, objectiveGiven;
    void paintEvent(QPaintEvent *);
    AbstractSystem *sys;
    int type;
    QList<double> params;
    double m1,m2,m3,m4;
    double s1,s2,s3;
    QList<double> objective;
};

#include "simulator.hpp"

#endif // SIMULATOR_H
